home *** CD-ROM | disk | FTP | other *** search
- /*
- File: FrameInfo.h
-
- Contains: FrameInfo utility class
-
- Written by: Steve Smith
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- */
-
-
- #ifndef _FRAMEINFO_
- #define _FRAMEINFO_
-
- // --- PanelEditor Includes ---
-
- #ifndef _PANELEDITORUTILS_
- #include "PanelEditorUtils.h"
- #endif
-
- #ifndef _SAMPLECOLLECTIONS_
- #include "SampleCollections.h"
- #endif
-
- // --- OpenDoc Includes ---
-
- #ifndef _ODTYPES_
- #include <ODTypes.h>
- #endif
-
- #ifndef SOM_ODShape_xh
- #include <Shape.xh>
- #endif
-
- // --- OpenDoc Utilities ---
-
- #ifndef _ITEXT_
- #include <IText.h>
- #endif
-
- #ifndef _ODUTILS_
- #include <ODUtils.h>
- #endif
-
- // --- Macintosh Includes ---
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
- // --- Forward Declarations ---
- class ODDraft;
- class ODFacet;
- class ODWindow;
- class ODStorageUnitView;
- class ODSession;
- class CScrollbar;
-
- //------------------------------------------------------------------------------
-
- class CFrameInfo
- {
- public:
- CFrameInfo(ODSession* session);
- ~CFrameInfo();
-
- void Externalize(Environment* ev, ODStorageUnitView* storageUnitView);
- void CleanseFrameInfoProperty(Environment* ev, ODStorageUnit* storageUnit);
- void ExternalizeFrameInfo(Environment* ev, ODStorageUnit* storageUnit,
- ODDraftKey key, ODFrame* scopeFrame);
- void CloneInto(Environment *ev, ODDraftKey key,
- ODStorageUnitView* storageUnitView,
- ODFrame* scopeFrame);
- void InitFromStorage(Environment* ev, ODStorageUnitView* storageUnitView);
-
- ODBoolean IsFrameActive();
- void SetFrameActive(ODBoolean active);
- ODBoolean FrameNeedsReactivating();
- void SetFrameReactivate(ODBoolean reactivate);
- ODFacet* GetActiveFacet();
- void SetActiveFacet(ODFacet* facet);
- void SetSourceFrame(Environment* ev, ODFrame* frame);
- ODFrame* GetSourceFrame(Environment* ev);
- void ReleaseSourceFrame(Environment* ev);
- ODBoolean HasSourceFrame();
- ODWindow* AcquirePartWindow(Environment* ev);
- void SetPartWindow(Environment* ev, ODWindow* window);
- void SetDependentFrame(Environment* ev, ODFrame* frame);
- ODFrame* GetDependentFrame(Environment* ev);
- ODBoolean HasDependentFrame();
- void ReleaseDependentFrame(Environment* ev);
- void SetShouldDisposeWindow(ODBoolean should);
- ODBoolean ShouldDisposeWindow();
- ODTypeToken GetPreviousViewType();
- void SetPreviousViewType(ODTypeToken viewType);
- ODBoolean ShouldNegotiate();
- void SetShouldNegotiate(ODBoolean should);
-
- private:
- CFrameInfo() {} /* don't want parts to call */
-
- ODSession* fSession;
- ODBoolean fFrameActive;
- ODBoolean fFrameReactivate;
- ODBoolean fShouldDisposeWindow;
- ODFacet* fActiveFacet;
- CFrameProxy* fSourceFrame;
- CFrameProxy* fDependentFrame;
- ODID fPartWindowID;
- ODTypeToken fPreviousViewType;
- ODBoolean fShouldNegotiate;
- };
-
-
-
-
- //-------------------------------------------------------------------------
- // Inline methods
- //-------------------------------------------------------------------------
-
- inline ODBoolean CFrameInfo::IsFrameActive()
- {
- return fFrameActive;
- }
-
- inline void CFrameInfo::SetFrameActive(ODBoolean active)
- {
- fFrameActive = active;
- }
-
- inline ODBoolean CFrameInfo::FrameNeedsReactivating()
- {
- return fFrameReactivate;
- }
-
- inline void CFrameInfo::SetFrameReactivate(ODBoolean reactivate)
- {
- fFrameReactivate = reactivate;
- }
-
- inline ODFacet* CFrameInfo::GetActiveFacet()
- {
- return fActiveFacet;
- }
-
- inline void CFrameInfo::SetActiveFacet(ODFacet* facet)
- {
- fActiveFacet = facet;
- }
-
- inline ODFrame* CFrameInfo::GetSourceFrame(Environment* ev)
- {
- return (fSourceFrame->GetFrame(ev));
- }
-
- inline ODBoolean CFrameInfo::HasSourceFrame()
- {
- return (fSourceFrame != kODNULL);
- }
-
- inline ODFrame* CFrameInfo::GetDependentFrame(Environment* ev)
- {
- return (fDependentFrame->GetFrame(ev));
- }
-
- inline ODBoolean CFrameInfo::HasDependentFrame()
- {
- return (fDependentFrame != kODNULL);
- }
-
- inline void CFrameInfo::SetShouldDisposeWindow(ODBoolean should)
- {
- fShouldDisposeWindow = should;
- }
-
- inline ODBoolean CFrameInfo::ShouldDisposeWindow()
- {
- return fShouldDisposeWindow;
- }
-
- inline ODTypeToken CFrameInfo::GetPreviousViewType()
- {
- return fPreviousViewType;
- }
-
- inline void CFrameInfo::SetPreviousViewType(ODTypeToken viewType)
- {
- fPreviousViewType = viewType;
- }
-
- inline ODBoolean CFrameInfo::ShouldNegotiate()
- {
- return fShouldNegotiate;
- }
-
- inline void CFrameInfo::SetShouldNegotiate(ODBoolean should)
- {
- fShouldNegotiate = should;
- }
-
- #endif
-
-